if __name__ == '__main__':
    import pandas as pd

    df = pd.read_csv("C:\\Users\\11314\\Desktop\\无标题.csv")
    # 将 hour_interval 列转换为 datetime 类型
    df['hour_interval'] = pd.to_datetime(df['hour_interval'])

    # 提取小时的两位数字
    df['hour'] = df['hour_interval'].dt.hour
    df = df.groupby('hour')['count'].mean().reset_index().sort_values(by='count')
    print(df)
    df = pd.read_csv("C:\\Users\\11314\\Desktop\\中断统计.csv")

    df = df.groupby('oltip')['occurrence_count'].sum().reset_index().sort_values(by='occurrence_count')
    print(df)
